package server.workwithmaster;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import abstractservlet.AbstractServlet;
import autoservice.api.controller.IAutoservice;
import controllers.Autoservice;

@WebServlet("/GetMasterList")
public class GetMasterList extends AbstractServlet {
	private static final String GET_MASTER_LIST_PAGE = "/workwithmasterpages/GetMasterListPage.jsp";
	private static final String MASTERLIST = "masterlist";
	private static final long serialVersionUID = 1L;
	private static final String GET_MASTER_LIST_OPERAT = "get master list";
	private IAutoservice autoservice = Autoservice.getInstance();

	public GetMasterList() {
		super();

	}

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		String parameters = request.getParameter(MASTERLIST);
		super.navigate(request, response, GET_MASTER_LIST_OPERAT,
				autoservice.SortMaster(parameters), GET_MASTER_LIST_PAGE);
	}

}
